define(['text!service/instructionsList.html', '../service/data/wiki'],
	function(viewTemplate, listJson) {
		return Piece.View.extend({
			id: 'service_instructionsList',

			bindings: {
				"List:select instructionsList": "instructionsListItemSelect",

			},
			render: function() {
				$(this.el).html(viewTemplate);

				Piece.View.prototype.render.call(this);
				return this;
			},

			listData: null,
			onShow: function() {
				//write your business logic here :)
				this.listData = listJson;
				console.info(this.listData.rows);
				this.components['instructionsList'].loadListByJSONArray(this.listData.rows);

			},
			instructionsListItemSelect: function(list, data) {


				// var exec = cordova.require('cordova/exec');
				console.log("打开word文档");
				cordova.exec(function(data) {



				}, function(err) {

				}, "DownLoad", "openword", []);
			},
		}); //view define

	});